﻿#region Copyright (C) Sector7 Software Studio. All rights reserved
/*******************************************************************************************
 * Creation
 *      Author:         Wolf Lai
 *      Date:           2012/3/10 11:09:21
 *      Version:        
 * Modification 
 *      Author: 
 *      Date: 
 *      Description: 
 *      Version:
 *******************************************************************************************/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sector7.Restaurant.EntityType;
using Sector7.Framework.Core;

namespace Sector7.Restaurant.DAO
{
    /// <summary>
    /// 元数据类型数据访问接口
    /// </summary>
    public interface IMetadataTypeDAO
    {
        /// <summary>
        /// 创建元数据类型
        /// </summary>
        /// <param name="type">元数据类型</param>
        /// <returns></returns>
        int Create(RS_MetadataType type);

        /// <summary>
        /// 读取所有元数据类型
        /// </summary>
        /// <param name="isGreedy">是否启用贪婪加载</param>
        /// <returns></returns>
        List<RS_MetadataType> ReadAll(bool isGreedy);

        /// <summary>
        /// 获取指定用途所有元数据类型
        /// </summary>
        /// <param name="usage">指定用途</param>
        /// <param name="isGreedy">是否启用贪婪加载</param>
        /// <returns></returns>
        List<RS_MetadataType> ReadAll(int usage, bool isGreedy);

        /// <summary>
        /// 修改元数据类型
        /// </summary>
        /// <param name="delta">元数据改变量</param>
        /// <returns></returns>
        int Update(EntityDelta delta);

        DBOptResultType Delete(int typeId);
    }
}
